#!/usr/bin/python
#  This is part of the Scopia data visualization example collection
#
#
#  Copyright (C) 2008  Scopia Visual Interfaces Systems 
#                      http://www.scopia.es
#
#  author: Alejandro Conty
#  contributors:
#
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
import scopiavf.adaptors.glut
import labviz.bitbroker.app as app
import sys
from labviz.bitbroker.chart import *

try:
    import psyco
    psyco.full()
    print "JIT enabled"
except:
    pass

transactions, starttime = loadTransactions( 'transactions.csv' )
chart = Chart( transactions )
adaptor = scopiavf.adaptors.glut.glutAdaptor_t(640, 480, lambda w, h: app.manager_t(w, h, chart) )
adaptor.loop()
